/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Br.Com.Cds.Academia.View;

import Br.Com.Cds.Academia.Aluno.AlunoBean;
import Br.Com.Cds.Academia.Aluno.AlunoControl;
import java.awt.Dimension;
import java.awt.Image;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;

/**
 *
 * @author p
 */
public class TelaCadastroAluno extends javax.swing.JFrame {
    
    DefaultTableModel tmAlunos = new DefaultTableModel(null,new String[]{"ID Aluno","Nome do Aluno"}); 
    ListSelectionModel lsmAlunos; 
    String tipoCadastro; 
    List <AlunoBean> alunos;
    String caminhoFoto = "";
    
    private void listarModalidades(){ 

        AlunoControl gru = new AlunoControl();
        alunos = gru.listarAluno("%" + TFPesquisartelaaluno.getText().trim() + "%");
        mostrarAlunos(alunos);

    }
        
        private void mostrarAlunos(List<AlunoBean> alunos){ 
        if ( alunos.size()==0){                        
            tmAlunos.setRowCount(0);
            JOptionPane.showMessageDialog(this,"Registro Não Encontrado!","CDS ACADEMIA",JOptionPane.INFORMATION_MESSAGE);
        }else{                                       
            while(tmAlunos.getRowCount() > 0){
                  tmAlunos.removeRow(0);

            }
            String[] campos = new String[] { null,null}; 
            for (int i = 0;i < alunos.size(); i++){   
                tmAlunos.addRow(campos);               
                tmAlunos.setValueAt(alunos.get(i).getIdaluno(),i,0);
                tmAlunos.setValueAt(alunos.get(i).getNome(),i,1);
  
            }
        }

    }
        
         private void tbModalidadesLinhaSelecionada(JTable tb){     

        if(tb.getSelectedRow() != -1){                      
            TFBairroaluno.setText(alunos.get(tb.getSelectedRow()).getBairro());
            TFCelularaluno.setText(alunos.get(tb.getSelectedRow()).getCelular());
            TFCepaluno.setText(alunos.get(tb.getSelectedRow()).getCep());
            TFCidadealuno.setText(alunos.get(tb.getSelectedRow()).getCidade());
            TFComplementoaluno.setText(alunos.get(tb.getSelectedRow()).getComplemento());
            TFCpfaluno.setText(alunos.get(tb.getSelectedRow()).getCpf());
            TFEmailaluno.setText(alunos.get(tb.getSelectedRow()).getEmail());
            TFEnderecoaluno.setText(alunos.get(tb.getSelectedRow()).getEndereco());
            TFNomealuno.setText(alunos.get(tb.getSelectedRow()).getNome());
            TFNumeroaluno.setText(alunos.get(tb.getSelectedRow()).getNumero());
            TFTelefonealuno.setText(alunos.get(tb.getSelectedRow()).getTelefone());
            TFdatanascimentoaluno.setDate(alunos.get(tb.getSelectedRow()).getDatanascimento());
            TFidadealuno.setText(alunos.get(tb.getSelectedRow()).getIdade());
            TFidentidade.setText(alunos.get(tb.getSelectedRow()).getRg());
            caminhoFoto = (alunos.get(tb.getSelectedRow()).getCaminhofoto()); //Retorna do Banco o String com o caminho da foto.
            String Imc = caminhoFoto;                              
            ImageIcon imagem = new ImageIcon(Imc);            
            Image img = imagem.getImage().getScaledInstance(150,200,Image.SCALE_DEFAULT);   //Redimensiona a Foto
            LBFotoaluno.setIcon(new ImageIcon(img));
            String pegaOrgaoEmissor = alunos.get(tb.getSelectedRow()).getOrgaoemissor();
            CBEstadoemissor.setSelectedItem(pegaOrgaoEmissor);
            String pegaUFEmissor = alunos.get(tb.getSelectedRow()).getEstadoemissor();
            CBEstadoemissor.setSelectedItem(pegaUFEmissor);
            String verVisit = alunos.get(tb.getSelectedRow()).getVisitante();
            if(verVisit.equals("1")){
               JRBvisitante.setSelected(true);
            }else{
              JRBvisitante.setSelected(false);
            }
            String pegaUF = alunos.get(tb.getSelectedRow()).getUf();
            CBEstadoaluno.setSelectedItem(pegaUF);
            String pegaStatus = alunos.get(tb.getSelectedRow()).getStatus(); 
            if(pegaStatus.equals("ATIVO")){                
               JRBativoaluno.setSelected(true);
               JRBtrancadoaluno.setSelected(false);
               JRBexcluidoaluno.setSelected(false);
            }else if(pegaStatus.equals("TRANCADO")){
               JRBtrancadoaluno.setSelected(true);
               JRBativoaluno.setSelected(false);
               JRBexcluidoaluno.setSelected(false);
            }else if(pegaStatus.equals("EXCLUIDO")){
              JRBtrancadoaluno.setSelected(false);
              JRBativoaluno.setSelected(false);
              JRBexcluidoaluno.setSelected(true);
            }

            BTalterarcadastro.setEnabled(true);    
            BTnovocadastro.setEnabled(true);       
            BTsalvarcadastro.setEnabled(false);


       }else{ // Se não houver nenhuma linha selecionada, deixa os campos em branco.
          
            TFNomealuno.setText("");
            TFBairroaluno.setText("");
            TFCelularaluno.setText("");
            TFCepaluno.setText("");
            TFCidadealuno.setText("");
            TFComplementoaluno.setText("");
            TFCpfaluno.setText("");
            TFEmailaluno.setText("");
            TFEnderecoaluno.setText("");
            TFNomealuno.setText("");
            TFNumeroaluno.setText("");
            TFTelefonealuno.setText("");
            TFidadealuno.setText("");
            TFidentidade.setText("");
            caminhoFoto = "";
            CBEstadoaluno.setSelectedIndex(-1);
            CBEstadoemissor.setSelectedIndex(-1);
            CBorgaoemissor.setSelectedIndex(-1);
            CBuf2.setSelectedIndex(-1);
            CBuf4.setSelectedIndex(-1);
            CBuf5.setSelectedIndex(-1);
            JRBativoaluno.setSelected(false);
            JRBexcluidoaluno.setSelected(false);
            JRBtrancadoaluno.setSelected(false);
            BTalterarcadastro.setEnabled(false);

       }

    }
         
         public void limpaTabela(){  
    DefaultTableModel tblRemove = (DefaultTableModel)TBTabelaluno.getModel();  
      
    if (tblRemove.getRowCount() > 0){  
        for (int i=1;i<=tblRemove.getRowCount();i++){  
            tblRemove.removeRow(0);  
        }              
    }  
  
} 
         
         private JTable getJTable() {        //Metódo para definir o tamanho das colunas na JTable.
     if (TBTabelaluno == null) {
         TBTabelaluno = new JTable(tmAlunos);
         defineRenderers();
   }       return TBTabelaluno;
   
 }
         
         private void defineRenderers() {
     DefaultTableCellRenderer rendererCentro = new DefaultTableCellRenderer();
     rendererCentro.setHorizontalAlignment(SwingConstants.CENTER);
     DefaultTableCellRenderer rendererDireita = new DefaultTableCellRenderer();
     rendererDireita.setHorizontalAlignment(SwingConstants.RIGHT);
     DefaultTableCellRenderer rendererEsquerda = new DefaultTableCellRenderer();
     rendererEsquerda.setHorizontalAlignment(SwingConstants.LEFT);

     JTableHeader header = TBTabelaluno.getTableHeader();
     header.setPreferredSize(new Dimension(0, 35));
     TableColumnModel modeloDaColuna = TBTabelaluno.getColumnModel();
     
    // Aqui se define se o texto vai ficar no meio ou nos cantos da coluna.
     
     modeloDaColuna.getColumn(0).setCellRenderer(rendererCentro); 
     modeloDaColuna.getColumn(1).setCellRenderer(rendererCentro); 

   // Aqui se define o tamanho das colunas.
     
     modeloDaColuna.getColumn(0).setMaxWidth(500);
     modeloDaColuna.getColumn(0).setMaxWidth(500);

 }

         private void novoAluno(){
            TFNomealuno.setText("");
            TFBairroaluno.setText("");
            TFCelularaluno.setText("");
            TFCepaluno.setText("");
            TFCidadealuno.setText("");
            TFComplementoaluno.setText("");
            TFCpfaluno.setText("");
            TFEmailaluno.setText("");
            TFEnderecoaluno.setText("");
            TFNomealuno.setText("");
            TFNumeroaluno.setText("");
            TFTelefonealuno.setText("");
            TFidadealuno.setText("");
            TFidentidade.setText("");
            caminhoFoto = "";
            CBEstadoaluno.setSelectedIndex(-1);
            CBEstadoemissor.setSelectedIndex(-1);
            CBorgaoemissor.setSelectedIndex(-1);
            CBuf2.setSelectedIndex(-1);
            CBuf4.setSelectedIndex(-1);
            CBuf5.setSelectedIndex(-1);
            JRBativoaluno.setSelected(false);
            JRBexcluidoaluno.setSelected(false);
            JRBtrancadoaluno.setSelected(false);
            BTalterarcadastro.setEnabled(false);
//            habilitarCampos();
         }
         
         private void limparCampos(){
            TFNomealuno.setText("");
            TFBairroaluno.setText("");
            TFCelularaluno.setText("");
            TFCepaluno.setText("");
            TFCidadealuno.setText("");
            TFComplementoaluno.setText("");
            TFCpfaluno.setText("");
            TFEmailaluno.setText("");
            TFEnderecoaluno.setText("");
            TFNomealuno.setText("");
            TFNumeroaluno.setText("");
            TFTelefonealuno.setText("");
            TFidadealuno.setText("");
            TFidentidade.setText("");
            caminhoFoto = "";
            CBEstadoaluno.setSelectedIndex(-1);
            CBEstadoemissor.setSelectedIndex(-1);
            CBorgaoemissor.setSelectedIndex(-1);
            CBuf2.setSelectedIndex(-1);
            CBuf4.setSelectedIndex(-1);
            CBuf5.setSelectedIndex(-1);
            JRBativoaluno.setSelected(false);
            JRBexcluidoaluno.setSelected(false);
            JRBtrancadoaluno.setSelected(false);
            BTalterarcadastro.setEnabled(false);
 
         }
         
         private boolean verificarCampos(){

        if(!TFNomealuno.getText().trim().equals("")){
            return true;
        }
        JOptionPane.showMessageDialog(this,"INFORME O NOME DO ALUNO !","CDS ACADEMIA",JOptionPane.WARNING_MESSAGE);
        return false;

    }
         
         private void cadastraAluno(){ 

         if(verificarCampos() ){ 

            AlunoControl gc = new AlunoControl();
            AlunoBean gb = new AlunoBean();

            gb.setNome(TFNomealuno.getText().trim()); 
            gb.setBairro(TFBairroaluno.getText().trim()); 
            gb.setCelular(TFCelularaluno.getText().trim()); 
            gb.setCep(TFCepaluno.getText().trim()); 
            gb.setCidade(TFCidadealuno.getText().trim()); 
            gb.setComplemento(TFComplementoaluno.getText().trim());
            gb.setCpf(TFCpfaluno.getText().trim()); 
            gb.setEmail(TFEmailaluno.getText().trim()); 
            gb.setEndereco(TFEnderecoaluno.getText().trim()); 
            gb.setEstadoemissor(CBEstadoemissor.getSelectedItem().toString());
            gb.setIdade(TFidadealuno.getText().trim()); 
            gb.setNumero(TFNumeroaluno.getText().trim()); 
            gb.setOrgaoemissor(CBorgaoemissor.getSelectedItem().toString());
            gb.setRg(TFidentidade.getText().trim()); 
            gb.setTelefone(TFTelefonealuno.getText().trim());  
            gb.setUf(CBEstadoaluno.getSelectedItem().toString());
            String dataNascimento = new SimpleDateFormat("dd/MM/yyyy").format(TFdatanascimentoaluno.getDate());  
            Date dataNasc = Date.valueOf(dataNascimento);
            gb.setDatanascimento(dataNasc);
            if(JRBvisitante.isSelected()){
               gb.setVisitante("1");
            }else{
               gb.setVisitante("0");
            }
            if(JRBativoaluno.isSelected()){ 
            gb.setStatus("ATIVO");
            }else if(JRBexcluidoaluno.isSelected()){
            gb.setStatus("EXCLUIDO");
            }else if(JRBtrancadoaluno.isSelected()){
            gb.setStatus("TRANCADO");
            }else{  
            JOptionPane.showMessageDialog(null,"INFORME O STATUS!","CDS ACADEMIA",JOptionPane.WARNING_MESSAGE);    
            }

            gc.cadastraAluno(gb);
            BTnovocadastro.setEnabled(true);
            limpaTabela();
            TFPesquisartelaaluno.setText("");
            JOptionPane.showMessageDialog(null,"ALUNO CADASTRADO COM SUCESSO","MENSAGEM DO PROGRAMA",JOptionPane.INFORMATION_MESSAGE);
//            desabilitarCampos();

         }
        }
     
        public void buscaCep(){
        String CEP = TFCepaluno.getText();
        WebServiceCep webServiceCep = WebServiceCep.searchCep(CEP);
        if (webServiceCep.wasSuccessful()) {
			
            TFEnderecoaluno.setText(webServiceCep.getLogradouroFull());
	    TFBairroaluno.setText(webServiceCep.getBairro());
            TFCidadealuno.setText(webServiceCep.getCidade());
            String UF = webServiceCep.getUf();
            System.out.print(webServiceCep.getUf());
            CBEstadoaluno.setSelectedItem(UF);
           // CBUf.setSelectedIndex(UFCon);
            
			
		//caso haja problemas imprime as exceções.
		} else {
                        JOptionPane.showMessageDialog(this, "CEP Não Encontrado");
		}
			
	}   
    /**
     * Creates new form TelaCadastroAluno
     */
    public TelaCadastroAluno() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jTextField1 = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jToggleButton1 = new javax.swing.JToggleButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        TFPesquisartelaaluno = new javax.swing.JTextField();
        BTPesquisartelaaluno = new javax.swing.JButton();
        jLabel13 = new javax.swing.JLabel();
        JTPhorarioaluno = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        TFNomealuno = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        TFBairroaluno = new javax.swing.JTextField();
        TFComplementoaluno = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        TFNumeroaluno = new javax.swing.JTextField();
        CBEstadoemissor = new javax.swing.JComboBox();
        jLabel10 = new javax.swing.JLabel();
        TFCpfaluno = new javax.swing.JFormattedTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        CBorgaoemissor = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        BTBuscarCepaluno = new javax.swing.JButton();
        TFCidadealuno = new javax.swing.JTextField();
        TFCepaluno = new javax.swing.JFormattedTextField();
        jLabel12 = new javax.swing.JLabel();
        TFEnderecoaluno = new javax.swing.JTextField();
        TFCelularaluno = new javax.swing.JFormattedTextField();
        TFidentidade = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        TFTelefonealuno = new javax.swing.JFormattedTextField();
        jLabel17 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        LBFotoaluno = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        TFidadealuno = new javax.swing.JTextField();
        CBEstadoaluno = new javax.swing.JComboBox();
        jToolBar2 = new javax.swing.JToolBar();
        jToolBar3 = new javax.swing.JToolBar();
        BTtirarfotoaluno = new javax.swing.JButton();
        BTexcluirfoto = new javax.swing.JButton();
        TFEmailaluno = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        JRBativoaluno = new javax.swing.JRadioButton();
        JRBtrancadoaluno = new javax.swing.JRadioButton();
        JRBexcluidoaluno = new javax.swing.JRadioButton();
        jPanel10 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        LBstatusaluno = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        LBatrasoaluno = new javax.swing.JLabel();
        LBsituacaoaluno = new javax.swing.JLabel();
        JRBvisitante = new javax.swing.JRadioButton();
        TFdatanascimentoaluno = new com.toedter.calendar.JDateChooser();
        jPanel7 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        CBuf2 = new javax.swing.JComboBox();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jLabel27 = new javax.swing.JLabel();
        CBuf4 = new javax.swing.JComboBox();
        jLabel28 = new javax.swing.JLabel();
        CBuf5 = new javax.swing.JComboBox();
        jTextField12 = new javax.swing.JTextField();
        jTextField13 = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jButton6 = new javax.swing.JButton();
        jLabel31 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jDateChooser1 = new com.toedter.calendar.JDateChooser();
        jDateChooser2 = new com.toedter.calendar.JDateChooser();
        jPanel8 = new javax.swing.JPanel();
        jLabel33 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jButton5 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        jScrollPane2 = new javax.swing.JScrollPane();
        TBTabelaluno = new javax.swing.JTable();
        jToolBar1 = new javax.swing.JToolBar();
        BTnovocadastro = new javax.swing.JButton();
        BTalterarcadastro = new javax.swing.JButton();
        BTsalvarcadastro = new javax.swing.JButton();
        BTexcluircadastro = new javax.swing.JButton();
        BTexcluircadastro2 = new javax.swing.JButton();

        jTextField1.setText("jTextField1");

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "Foto", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 127, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 140, Short.MAX_VALUE)
        );

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        jToggleButton1.setText("jToggleButton1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("CADASTRO DE ALUNO");

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));

        jLabel1.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Male.png"))); // NOI18N
        jLabel1.setText("CADASTRO DE ALUNO");

        jLabel2.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N
        jLabel2.setText("MATRÍCULA:");

        jLabel3.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N
        jLabel3.setText("00001");

        TFPesquisartelaaluno.setToolTipText("Digite o Nome do Aluno");

        BTPesquisartelaaluno.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        BTPesquisartelaaluno.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Find.png"))); // NOI18N
        BTPesquisartelaaluno.setText("Pesquisar");
        BTPesquisartelaaluno.setToolTipText("Pesquisar");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(86, 86, 86)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(TFPesquisartelaaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(BTPesquisartelaaluno)
                .addGap(22, 22, 22))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(TFPesquisartelaaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(BTPesquisartelaaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel13.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N

        JTPhorarioaluno.setBackground(new java.awt.Color(255, 255, 255));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jLabel6.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel6.setText("CEP:");

        TFNomealuno.setToolTipText("Nome do Aluno");

        jLabel7.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel7.setText("CPF:");

        TFBairroaluno.setToolTipText("Bairro");

        TFComplementoaluno.setToolTipText("Complemento");

        jLabel4.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel4.setText("NOME:");

        TFNumeroaluno.setToolTipText("Número");

        CBEstadoemissor.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO" }));
        CBEstadoemissor.setToolTipText("Estado");

        jLabel10.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel10.setText("CIDADE:");

        try {
            TFCpfaluno.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TFCpfaluno.setToolTipText("CPF");

        jLabel11.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel11.setText("BAIRRO:");

        jLabel8.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel8.setText("END:");

        CBorgaoemissor.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SSP", "SDS" }));
        CBorgaoemissor.setToolTipText("Orgão Emissor");

        jLabel14.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel14.setText("COMPLEMENTO:");

        BTBuscarCepaluno.setText("BUSCAR");
        BTBuscarCepaluno.setToolTipText("Buscar CEP");
        BTBuscarCepaluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTBuscarCepalunoActionPerformed(evt);
            }
        });

        TFCidadealuno.setToolTipText("Cidade");

        try {
            TFCepaluno.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#####-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TFCepaluno.setToolTipText("CEP");

        jLabel12.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel12.setText("TELEFONE:");

        TFEnderecoaluno.setToolTipText("Endereço");

        try {
            TFCelularaluno.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TFCelularaluno.setToolTipText("Celular");

        TFidentidade.setToolTipText("RG");

        jLabel16.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel16.setText("UF:");

        try {
            TFTelefonealuno.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        TFTelefonealuno.setToolTipText("Telefone");

        jLabel17.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel17.setText("CELULAR:");

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "FOTO", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Yu Gothic", 1, 10))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(LBFotoaluno, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(LBFotoaluno, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
        );

        jLabel18.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel18.setText("RG:");

        jLabel9.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel9.setText("Nº");

        jLabel15.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel15.setText("DATA NASCIMENTO:");

        jLabel19.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel19.setText("IDADE:");

        TFidadealuno.setToolTipText("Idade");

        CBEstadoaluno.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO" }));
        CBEstadoaluno.setToolTipText("Estado");

        jToolBar2.setFloatable(false);
        jToolBar2.setRollover(true);

        jToolBar3.setFloatable(false);
        jToolBar3.setRollover(true);

        BTtirarfotoaluno.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/webcam.png"))); // NOI18N
        BTtirarfotoaluno.setFocusable(false);
        BTtirarfotoaluno.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTtirarfotoaluno.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTtirarfotoaluno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTtirarfotoalunoActionPerformed(evt);
            }
        });
        jToolBar3.add(BTtirarfotoaluno);

        BTexcluirfoto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Close 16X16.png"))); // NOI18N
        jToolBar3.add(BTexcluirfoto);

        TFEmailaluno.setToolTipText("Email");

        jLabel22.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel22.setText("EMAIL:");

        jPanel9.setBackground(new java.awt.Color(255, 255, 255));
        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "STATUS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Yu Gothic", 1, 10))); // NOI18N

        JRBativoaluno.setBackground(new java.awt.Color(255, 255, 255));
        JRBativoaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBativoaluno.setText("ATIVADO");
        JRBativoaluno.setToolTipText("Aluno Ativo");

        JRBtrancadoaluno.setBackground(new java.awt.Color(255, 255, 255));
        JRBtrancadoaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBtrancadoaluno.setText("TRANCADO");
        JRBtrancadoaluno.setToolTipText("Aluno Trancado");

        JRBexcluidoaluno.setBackground(new java.awt.Color(255, 255, 255));
        JRBexcluidoaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBexcluidoaluno.setText("EXCLUÍDO");
        JRBexcluidoaluno.setToolTipText("Aluno Excluído");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JRBativoaluno)
                    .addComponent(JRBexcluidoaluno)
                    .addComponent(JRBtrancadoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(25, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(JRBativoaluno)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JRBtrancadoaluno)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JRBexcluidoaluno)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel10.setBackground(new java.awt.Color(255, 255, 255));
        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "SITUAÇÃO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Yu Gothic", 1, 10))); // NOI18N

        jLabel21.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel21.setText("STATUS:");

        LBstatusaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        LBstatusaluno.setForeground(new java.awt.Color(0, 153, 0));
        LBstatusaluno.setText("ATIVO");
        LBstatusaluno.setToolTipText("Situação do Aluno");

        jLabel26.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel26.setText("DIAS EM ATRASO:");

        LBatrasoaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        LBatrasoaluno.setForeground(new java.awt.Color(0, 153, 0));
        LBatrasoaluno.setText("0");
        LBatrasoaluno.setToolTipText("Dias em Atraso");

        LBsituacaoaluno.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        LBsituacaoaluno.setForeground(new java.awt.Color(0, 153, 0));
        LBsituacaoaluno.setText("EM DIAS");
        LBsituacaoaluno.setToolTipText("Situação do Aluno");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel20))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGap(58, 58, 58)
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LBstatusaluno)
                        .addGap(72, 72, 72)
                        .addComponent(LBsituacaoaluno)
                        .addGap(64, 64, 64)
                        .addComponent(jLabel26)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LBatrasoaluno)))
                .addContainerGap(55, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(LBstatusaluno, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel26, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel21)
                        .addComponent(LBatrasoaluno)
                        .addComponent(LBsituacaoaluno)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel20))
        );

        JRBvisitante.setBackground(new java.awt.Color(255, 255, 255));
        JRBvisitante.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBvisitante.setText("VISITANTE");
        JRBvisitante.setToolTipText("Marque se for Visitante");

        TFdatanascimentoaluno.setToolTipText("Data de Nascimento");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(49, 49, 49)
                                .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(46, 46, 46)
                        .addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TFNomealuno)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JRBvisitante)
                                .addGap(4, 4, 4))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFNumeroaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(32, 32, 32)
                                .addComponent(jLabel14)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFComplementoaluno)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel16)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(CBEstadoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFCidadealuno, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFBairroaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFCepaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(BTBuscarCepaluno)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TFEnderecoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 308, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel18)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TFidentidade, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(CBorgaoemissor, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(CBEstadoemissor, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(49, 49, 49)
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(TFCpfaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 56, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addGap(6, 6, 6)
                                .addComponent(TFdatanascimentoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(TFTelefonealuno, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel17))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel22)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(TFEmailaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(TFCelularaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGap(40, 40, 40)
                                        .addComponent(jLabel19)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(TFidadealuno, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(TFNomealuno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(JRBvisitante))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(TFidentidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TFCpfaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(CBEstadoemissor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(CBorgaoemissor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(BTBuscarCepaluno)
                            .addComponent(TFCepaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8)
                            .addComponent(TFEnderecoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(TFBairroaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11)
                            .addComponent(TFCidadealuno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TFNumeroaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14)
                            .addComponent(TFComplementoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16)
                            .addComponent(jLabel9)
                            .addComponent(CBEstadoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(TFTelefonealuno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel17)
                            .addComponent(TFCelularaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel22)
                            .addComponent(TFEmailaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel15)
                                .addComponent(jLabel19)
                                .addComponent(TFidadealuno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(TFdatanascimentoaluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(1, 1, 1)
                        .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(63, 63, 63))
        );

        JTPhorarioaluno.addTab("DADOS CADASTRAIS", jPanel3);

        jPanel7.setBackground(new java.awt.Color(255, 255, 255));

        jLabel25.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel25.setText("MODALIDADE :");

        CBuf2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SSP", "SDS" }));
        CBuf2.setToolTipText("Modalidade");

        jTable3.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "MATRICULA", "MODALIDADE", "TURMA", "PLANO"
            }
        ));
        jScrollPane3.setViewportView(jTable3);

        jLabel27.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel27.setText("PLANO:");

        CBuf4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SSP", "SDS" }));
        CBuf4.setToolTipText("Plano de Pagamento");

        jLabel28.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel28.setText("TURMA:");

        CBuf5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SSP", "SDS" }));
        CBuf5.setToolTipText("Turma");

        jTextField12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));

        jTextField13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));

        jLabel35.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        jLabel35.setText("R$");

        jLabel36.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N
        jLabel36.setText("%");

        jLabel34.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel34.setText("DESCONTO:");

        jButton6.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Apply.png"))); // NOI18N
        jButton6.setText("CAIXA");

        jLabel31.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel31.setText("DATA INICIO:");

        jLabel37.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel37.setText("DATA VENCIMENTO:");

        jDateChooser1.setToolTipText("Data de Início");

        jDateChooser2.setToolTipText("Data de Vencimento");

        jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jLabel33.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N
        jLabel33.setText("100,00");

        jLabel32.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N
        jLabel32.setText("VALOR R$:");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(38, Short.MAX_VALUE)
                .addComponent(jLabel32)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel33)
                .addGap(32, 32, 32))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(38, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(jLabel33))
                .addGap(32, 32, 32))
        );

        jLabel38.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel38.setText("ÀS:");

        jLabel39.setText("jLabel39");

        jLabel40.setText("jLabel39");

        jLabel41.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel41.setText("HORA:");

        jButton5.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Add.png"))); // NOI18N
        jButton5.setText("Adicionar");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 791, Short.MAX_VALUE)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel28)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(CBuf5, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel27)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(CBuf4, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel25)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(CBuf2, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(21, 21, 21))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel37)
                                            .addComponent(jLabel31))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jDateChooser1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                        .addComponent(jLabel41)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel39)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel38)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel40)))
                                .addGap(103, 103, 103))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel34)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel36)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel35)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jButton5)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(74, 74, 74))))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGap(42, 42, 42)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel25)
                            .addComponent(CBuf2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(CBuf4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel28)
                            .addComponent(CBuf5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel31)
                            .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel37)
                            .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jButton6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel40)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel38)
                        .addComponent(jLabel39)
                        .addComponent(jLabel41)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(jLabel36)
                    .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(jButton5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        JTPhorarioaluno.addTab("MATRÍCULA", jPanel7);

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));

        jTable4.setFont(new java.awt.Font("Yu Gothic", 0, 10)); // NOI18N
        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "IDMATRICULA", "NOME", "MODALIDADE", "PLANO", "HORÁRIO", "DIA"
            }
        ));
        jScrollPane4.setViewportView(jTable4);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 791, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                .addContainerGap())
        );

        JTPhorarioaluno.addTab("HORÁRIO", jPanel4);

        TBTabelaluno.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        TBTabelaluno.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Nome", "Plano", "Turma"
            }
        ));
        TBTabelaluno.setToolTipText("Alunos");
        jScrollPane2.setViewportView(TBTabelaluno);

        jToolBar1.setBorder(null);
        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        BTnovocadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTnovocadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Add.png"))); // NOI18N
        BTnovocadastro.setText("Novo");
        BTnovocadastro.setFocusable(false);
        BTnovocadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTnovocadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(BTnovocadastro);

        BTalterarcadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTalterarcadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Modify.png"))); // NOI18N
        BTalterarcadastro.setText("Alterar");
        BTalterarcadastro.setFocusable(false);
        BTalterarcadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTalterarcadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(BTalterarcadastro);

        BTsalvarcadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTsalvarcadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Apply.png"))); // NOI18N
        BTsalvarcadastro.setText("Salvar");
        BTsalvarcadastro.setFocusable(false);
        BTsalvarcadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTsalvarcadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(BTsalvarcadastro);

        BTexcluircadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTexcluircadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Erase.png"))); // NOI18N
        BTexcluircadastro.setText("Excluir");
        BTexcluircadastro.setFocusable(false);
        BTexcluircadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTexcluircadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(BTexcluircadastro);

        BTexcluircadastro2.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTexcluircadastro2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/No.png"))); // NOI18N
        BTexcluircadastro2.setText("Cancelar");
        BTexcluircadastro2.setFocusable(false);
        BTexcluircadastro2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTexcluircadastro2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(BTexcluircadastro2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(JTPhorarioaluno))
                    .addComponent(jScrollPane2)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(254, 254, 254)
                        .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addGap(189, 189, 189))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(JTPhorarioaluno, javax.swing.GroupLayout.PREFERRED_SIZE, 448, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );

        setSize(new java.awt.Dimension(830, 702));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void BTBuscarCepalunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTBuscarCepalunoActionPerformed
buscaCep();        // TODO add your handling code here:
    }//GEN-LAST:event_BTBuscarCepalunoActionPerformed

    private void BTtirarfotoalunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTtirarfotoalunoActionPerformed
CapturaFoto cap = new CapturaFoto();
// TODO add your handling code here:
    }//GEN-LAST:event_BTtirarfotoalunoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroAluno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaCadastroAluno().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BTBuscarCepaluno;
    private javax.swing.JButton BTPesquisartelaaluno;
    private javax.swing.JButton BTalterarcadastro;
    private javax.swing.JButton BTexcluircadastro;
    private javax.swing.JButton BTexcluircadastro2;
    private javax.swing.JButton BTexcluirfoto;
    private javax.swing.JButton BTnovocadastro;
    private javax.swing.JButton BTsalvarcadastro;
    private javax.swing.JButton BTtirarfotoaluno;
    private javax.swing.JComboBox CBEstadoaluno;
    private javax.swing.JComboBox CBEstadoemissor;
    private javax.swing.JComboBox CBorgaoemissor;
    private javax.swing.JComboBox CBuf2;
    private javax.swing.JComboBox CBuf4;
    private javax.swing.JComboBox CBuf5;
    private javax.swing.JRadioButton JRBativoaluno;
    private javax.swing.JRadioButton JRBexcluidoaluno;
    private javax.swing.JRadioButton JRBtrancadoaluno;
    private javax.swing.JRadioButton JRBvisitante;
    private javax.swing.JTabbedPane JTPhorarioaluno;
    private javax.swing.JLabel LBFotoaluno;
    private javax.swing.JLabel LBatrasoaluno;
    private javax.swing.JLabel LBsituacaoaluno;
    private javax.swing.JLabel LBstatusaluno;
    private javax.swing.JTable TBTabelaluno;
    private javax.swing.JTextField TFBairroaluno;
    private javax.swing.JFormattedTextField TFCelularaluno;
    private javax.swing.JFormattedTextField TFCepaluno;
    private javax.swing.JTextField TFCidadealuno;
    private javax.swing.JTextField TFComplementoaluno;
    private javax.swing.JFormattedTextField TFCpfaluno;
    private javax.swing.JTextField TFEmailaluno;
    private javax.swing.JTextField TFEnderecoaluno;
    private javax.swing.JTextField TFNomealuno;
    private javax.swing.JTextField TFNumeroaluno;
    private javax.swing.JTextField TFPesquisartelaaluno;
    private javax.swing.JFormattedTextField TFTelefonealuno;
    private com.toedter.calendar.JDateChooser TFdatanascimentoaluno;
    private javax.swing.JTextField TFidadealuno;
    private javax.swing.JTextField TFidentidade;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private com.toedter.calendar.JDateChooser jDateChooser1;
    private com.toedter.calendar.JDateChooser jDateChooser2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable3;
    private javax.swing.JTable jTable4;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField12;
    private javax.swing.JTextField jTextField13;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JToolBar jToolBar3;
    // End of variables declaration//GEN-END:variables
}
